/*
 * @Date: 2020-02-18 09:55:36
 * @LastEditors: peng qiao
 * @LastEditTime: 2020-02-26 11:41:03
 */
import http from './Common/http.js'
import constant from '@/controller/constant.js'

export default {
  // 分页查询轮播图
  affair_banner_v1_list_front: async function (curPage, pageSize) {
    const res = await http.get(`${constant.BASE_URL}/affair/banner/v1/list/front/${pageSize}/${curPage}`)
    return res
  },
  // 分页查询热点资讯列表
  hot_information_entity_page: async function (curPage, pageSize) {
    const res = await http.get(`${constant.BASE_URL}/hotInformationEntity/page/${pageSize}/${curPage}`)
    return res
  },
  // 热点资讯详情
  hot_information_entity_find: async function (id) {
    const res = await http.get(`${constant.BASE_URL}/hotInformationEntity/find/${id}`)
    return res
  },
  // 分页查询服务指南
  service_guide_v1_page: async function (curPage, pageSize) {
    const res = await http.post(`${constant.BASE_URL}/serviceGuide/v1/page/${pageSize}/${curPage}`,{})
    return res
  },
  // 服务类型列表
  service_category_v1_list: async function (data) {
    const res = await http.get(`${constant.BASE_URL}/serviceCategory/v1/list`, data)
    return res
  },
  // 服务类型列表下属列表
  service_v1_list: async function (data) {
    const res = await http.get(`${constant.BASE_URL}/service/v1/list`, data)
    return res
  },
  // 服务类型列表下属列表详情
  service_v1_find: async function (id) {
    const res = await http.get(`${constant.BASE_URL}/service/v1/find/${id}`)
    return res
  },
  // 服务申请
  service_v1_apply: async function (data) {
    const res = await http.post(`${constant.BASE_URL}/serviceApply/v1/apply`, data)
    return res
  },
  // 服务修改
  service_v1_update: async function (data) {
    const res = await http.post(`${constant.BASE_URL}/serviceApply/v1/update`, data)
    return res
  },
  // 分页查询我的快递
  express_delivery_v1_find_own: async function (pageSize,curPage,data) {
    const res = await http.post(`${constant.BASE_URL}/expressDelivery/v1/findOwn/${pageSize}/${curPage}`, data)
    return res
  },
  // 快递删除
  express_delivery_v1_delete: async function (id) {
    const res = await http.delete(`${constant.BASE_URL}/expressDelivery/v1/delete/${id}`)
    return res
  },
  // 办件进度统计
  service_apply_v1_statistics: async function () {
    const res = await http.get(`${constant.BASE_URL}/serviceApply/v1/statistics`)
    return res
  },
  // 办件状态分页查询
  service_apply_v1_find_own_page: async function (pageSize,curPage,data) {
    const res = await http.get(`${constant.BASE_URL}/serviceApply/v1/findOwn/${pageSize}/${curPage}`,data)
    return res
  },
  // 办件撤销
  service_apply_v1_revoke: async function (id) {
    const res = await http.delete(`${constant.BASE_URL}/serviceApply/v1/revoke/${id}`)
    return res
  },
  // 办件详情
  service_apply_v1_find: async function (id) {
    const res = await http.get(`${constant.BASE_URL}/serviceApply/v1/find/${id}`)
    return res
  },
}